package com.prs.crm.domain.document;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.flow.WorkFlow;
import com.prs.crm.domain.hr.Person;

/**
 * @author YangHao
 * @E-Mail:450098606@qq.com
 * @qq:450098606
 * @version 创建时间：2012-5-14 13:50:59 发文拟稿
 */
@Entity
@Table(name="docu_draft")
public class Draft  extends BaseEntity{

	private static final long serialVersionUID = 5756251999159699623L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String type;//重要级别
	private String theme;//主题
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach; 
	
	private String number;//发文字号
	private String level;//密级
	private String  title;//标题
	private String descriptor;//主题词
	private String hostunit;//主办单位
	@ManyToOne
	private Person person;//拟稿人
	private String checked;//校对
	private String shanyin;//缮印
	private String yongyin;//用印
	private String mainLivery;//主送
	private String copyto;//抄送
	private String flow;//正在进行的流程
	private String state;//状态
	private String idea;//意见
	
	private String issueTime;//分发时间
	private String readyPerson;//阅读人
	private String readyPersonId;//阅读人 Id;
	private String isReady;//是否阅读
	private String readyIdea;//阅读意见
	@ManyToOne
	private DraftType draftType;
	@ManyToOne
	private WorkFlow workFlow;
	
	private String draftTypeName;
	private Integer appState;//审批状态    0未提交 1审批中 2，审批完成 4未通过审批
	private String showState;//显示状态
	private String personAppProcess;
	private Integer personAppState;
	private Integer oabox;
	private String alreadyreadPerson;
	private String showReady;
	private String jkState;
	public String getJkState() {
		return jkState;
	}
	public void setJkState(String jkState) {
		this.jkState = jkState;
	}
	public String getAlreadyreadPerson() {
		return alreadyreadPerson;
	}
	public void setAlreadyreadPerson(String alreadyreadPerson) {
		this.alreadyreadPerson = alreadyreadPerson;
	}
	public String getShowReady() {
		return showReady;
	}
	public void setShowReady(String showReady) {
		this.showReady = showReady;
	}
	public Integer getOabox() {
		return oabox;
	}
	public void setOabox(Integer oabox) {
		this.oabox = oabox;
	}
	public String getPersonAppProcess() {
		return personAppProcess;
	}
	public void setPersonAppProcess(String personAppProcess) {
		this.personAppProcess = personAppProcess;
	}
	public Integer getPersonAppState() {
		return personAppState;
	}
	public void setPersonAppState(Integer personAppState) {
		this.personAppState = personAppState;
	}
	public String getDraftTypeName() {
		return draftTypeName;
	}
	public void setDraftTypeName(String draftTypeName) {
		this.draftTypeName = draftTypeName;
	}
	public WorkFlow getWorkFlow() {
		return workFlow;
	}
	public void setWorkFlow(WorkFlow workFlow) {
		this.workFlow = workFlow;
	}
	public Integer getAppState() {
		return appState;
	}
	public void setAppState(Integer appState) {
		this.appState = appState;
	}
	public String getShowState() {
		return showState;
	}
	public void setShowState(String showState) {
		this.showState = showState;
	}
	public String getReadyIdea() {
		return readyIdea;
	}
	public void setReadyIdea(String readyIdea) {
		this.readyIdea = readyIdea;
	}
	public String getIsReady() {
		return isReady;
	}
	public void setIsReady(String isReady) {
		this.isReady = isReady;
	}
	public String getIssueTime() {
		return issueTime;
	}
	public void setIssueTime(String issueTime) {
		this.issueTime = issueTime;
	}
	public String getReadyPerson() {
		return readyPerson;
	}
	public void setReadyPerson(String readyPerson) {
		this.readyPerson = readyPerson;
	}
	public String getReadyPersonId() {
		return readyPersonId;
	}
	public void setReadyPersonId(String readyPersonId) {
		this.readyPersonId = readyPersonId;
	}
	public String getIdea() {
		return idea;
	}
	public void setIdea(String idea) {
		this.idea = idea;
	}

	public DraftType getDraftType() {
		return draftType;
	}
	public void setDraftType(DraftType draftType) {
		this.draftType = draftType;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getTheme() {
		return theme;
	}
	public void setTheme(String theme) {
		this.theme = theme;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public String getLevel() {
		return level;
	}
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescriptor() {
		return descriptor;
	}
	public void setDescriptor(String descriptor) {
		this.descriptor = descriptor;
	}
	public String getHostunit() {
		return hostunit;
	}
	public void setHostunit(String hostunit) {
		this.hostunit = hostunit;
	}
	public Person getPerson() {
		return person;
	}
	public void setPerson(Person person) {
		this.person = person;
	}
	public String getChecked() {
		return checked;
	}
	public void setChecked(String checked) {
		this.checked = checked;
	}
	public String getShanyin() {
		return shanyin;
	}
	public void setShanyin(String shanyin) {
		this.shanyin = shanyin;
	}
	public String getYongyin() {
		return yongyin;
	}
	public void setYongyin(String yongyin) {
		this.yongyin = yongyin;
	}
	public String getMainLivery() {
		return mainLivery;
	}
	public void setMainLivery(String mainLivery) {
		this.mainLivery = mainLivery;
	}
	public String getCopyto() {
		return copyto;
	}
	public void setCopyto(String copyto) {
		this.copyto = copyto;
	}
	public String getFlow() {
		return flow;
	}
	public void setFlow(String flow) {
		this.flow = flow;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}

}
